let Monday = [],
  Tuesday = ['今天','周二'],
  Wednesday = [],
  Thursday = [],
  Friday = [],
  Saturday = [],
  Sunday = [];
  
class Text {
  constructor(texts) {
    this.Monday = texts.Monday
    this.Tuesday = texts.Tuesday
    this.Wednesday = texts.Wednesday
    this.Thursday = texts.Thursday
    this.Friday = texts.Friday
    this.Saturday = texts.Saturday
    this.Sunday = texts.Sunday
  }
  getText() {
    let text = null
    let today = this.getWeekDate()
    let n = Math.floor(Math.random() * this[today.name].length + 1)-1; 
    text = this[today.name][n]
    return text
  }
  getWeekDate() {
    var now = new Date();
    var day = now.getDay();
    var weeks = new Array({
      cn: "星期日",
      name: "Sunday"
    }, {
      cn: "星期一",
      name: "Monday"
    },{
      cn: "星期二",
      name: "Tuesday"
    },{
      cn: "星期三",
      name: "Wednesday"
    },{
      cn: "星期四",
      name: "Thursday"
    },{
      cn: "星期五",
      name: "Friday"
    },{
      cn: "星期六",
      name: "Saturday"
    });
    var week = weeks[day];
    return week;
  }
}

let text = new Text({
  Monday,
  Tuesday,
  Wednesday,
  Thursday,
  Friday,
  Saturday,
  Sunday
})